package com.hz.house.dao;

import java.util.List;
import java.util.Map;

import com.hz.house.bean.entity.AnswerReplyBean;
import com.hz.house.bean.entity.FAQAnswerBean;
import com.hz.house.bean.entity.FAQBean;
import com.hz.house.bean.entity.FAQTypeRef;
import com.hz.house.bean.vo.FAQBillInfo;
import com.hz.house.bean.vo.MyAnswerVo;
import com.hz.house.bean.vo.SimpleBean;

import io.lettuce.core.dynamic.annotation.Param;

public interface FAQMapper {

	int addNewQuestion(FAQBean faq);
	
	Integer getMaxFAQId();
	
	int addFaqTypes(List<FAQTypeRef> tps);
	
	List<FAQBean> getFaqList(Map<String,Object> m);
	
	Integer getFaqListTotal(Map<String,Object> m);
	
	List<FAQTypeRef> getTypes(List<FAQBean> faq);
	
	int addAnswer(FAQAnswerBean ans);
	
	int praiseA(@Param("customerId")int customerId,@Param("answerId")int answerId);
	
	int delPraiseA(@Param("customerId")int customerId,@Param("answerId")int answerId);
	
	int addReply(AnswerReplyBean r);
	
	FAQBean getFAQDetail(@Param("faqId")int faqId);
	
	
	int zhuiWen(@Param("content")String content,@Param("faqId")int faqId);
	
	List<FAQAnswerBean> getAnswerList(@Param("page")int page,@Param("size")int size,@Param("faqId")int faqId);
	
	Integer getAnswerListTotal(@Param("faqId")int faqId);
	
	List<AnswerReplyBean> getAnswerReplys(List<FAQAnswerBean> as);
	
	List<Integer> getIPraise(@Param("customerId")int customerId);
	
	void synFaqLookNum(List<SimpleBean> sbs);
	
	List<FAQBean> getMyFaqList(Map<String,Object> m);
	Integer getMyFaqListTotal(Map<String,Object> m);
	
	List<MyAnswerVo> getMyAnswers(Map<String,Object> m);
	Integer getMyAnswersTotal(Map<String,Object> m);
	
	Integer getFaqCustomerId(@Param("faqId")int faqId);
	
	FAQBillInfo getFaqBillInfo(@Param("faqId")int faqId);
}
